import { defineStore } from "pinia";
import pinia from "@/store";
export interface AppState {
    title: string;
    subTitle: string;
    theme?: string;
}
export const useHomeStore = defineStore(
    // 唯一ID
    "Home",
    {
        state: () => ({
            title: "Vue4-Typescript4-Template",
            subTitle: "企业级中后台系统前端解决方案",
        }),
        getters: {},
        actions: {
            updateInfo(partial: Partial<AppState>) {
                this.$patch(partial);
            },
        },
    },
);

export function useHomeStoreHook() {
    return useHomeStore(pinia);
}
